using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools._Caching
{
    /// <summary>
    /// <para>Create Map Server Cache</para>
    /// <para>Creates the tiling scheme and preparatory folders for a map or image service cache. After running this tool, use the Manage Map Server Cache Tiles tool to add tiles to the cache.</para>
    /// <para>创建地图或影像服务缓存的切片方案和准备文件夹。运行此工具后，使用管理地图服务器缓存切片工具将切片添加到缓存中。</para>
    /// </summary>    
    [DisplayName("Create Map Server Cache")]
    public class CreateMapServerCache : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateMapServerCache()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_service">
        /// <para>Input Service</para>
        /// <para>The map or image layer to be cached. You can drag a map or image layer from the Catalog window to supply this parameter.</para>
        /// <para>要缓存的地图或图像图层。您可以从目录 窗口拖动地图或影像图层以提供此参数。</para>
        /// </param>
        /// <param name="_service_cache_directory">
        /// <para>Service Cache Directory</para>
        /// <para>The parent directory for the cache. This must be a registered ArcGIS Server cache directory.</para>
        /// <para>缓存的父目录。这必须是已注册的 ArcGIS Server 缓存目录。</para>
        /// </param>
        /// <param name="_tiling_scheme_type">
        /// <para>Tiling Scheme</para>
        /// <para><xdoc>
        ///   <para>Specifies how the tiling scheme will be defined. You can define a new tiling scheme with this tool or browse to a predefined tiling scheme file (.xml). A predefined scheme can be created by running the Generate Map Server Cache Tiling Scheme tool.</para>
        ///   <bulletList>
        ///     <bullet_item>New—The tiling scheme will be defined using other parameters in this tool to define scale levels, image format, storage format, and so on. This is the default.</bullet_item><para/>
        ///     <bullet_item>Predefined—The tiling scheme will be defined using an .xml file. You can create a tiling scheme file using the Generate Map Server Cache Tiling Scheme tool.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何定义切片方案。您可以使用此工具定义新的切片方案，也可以浏览至预定义的切片方案文件 （.xml）。可以通过运行生成地图服务器缓存切片方案工具来创建预定义方案。</para>
        ///   <bulletList>
        ///     <bullet_item></bullet_item><para/>
        ///     <bullet_item></bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_scales_type">
        /// <para>Scales Type</para>
        /// <para><xdoc>
        ///   <para>Specifies how the tiles will be scaled.</para>
        ///   <bulletList>
        ///     <bullet_item>Standard—The scales will be automatically generated based on the number specified in the Number of Scales (num_of_scales in Python) parameter. It will use levels that increase or decrease by half from 1:1,000,000 and will start with a level closest to the extent of the source map document. For example, if the source map document has an extent of 1:121,000,000 and three scale levels are defined, the map service will create a cache with scale levels at 1:128,000,000; 1:64,000,000; and 1:32,000,000. This is the default.</bullet_item><para/>
        ///     <bullet_item>Custom—The cache designer will determine the scales.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定切片的缩放方式。</para>
        ///   <bulletList>
        ///     <bullet_item></bullet_item><para/>
        ///     <bullet_item></bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_num_of_scales">
        /// <para>Number of Scales</para>
        /// <para>The number of scale levels to create in the cache. This option is disabled if you create a custom list of scales.</para>
        /// <para>要在缓存中创建的缩放级别数。如果创建自定义比例列表，则此选项处于禁用状态。</para>
        /// </param>
        /// <param name="_dots_per_inch">
        /// <para>Dots(Pixels) Per Inch</para>
        /// <para>The dots per inch (DPI) of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96.</para>
        /// <para>预期输出设备的每英寸点数 （DPI）。如果选择的 DPI 与输出设备的分辨率不匹配，则地图切片的比例将显示不正确。默认值为 96。</para>
        /// </param>
        /// <param name="_tile_size">
        /// <para>Tile Size (in pixels)</para>
        /// <para><xdoc>
        ///   <para>Specifies the width and height of the cache tiles in pixels. For the best balance between performance and manageability, avoid deviating from standard widths of 256 by 256 or 512 by 512.</para>
        ///   <bulletList>
        ///     <bullet_item>128 by 128—128 by 128 pixels.</bullet_item><para/>
        ///     <bullet_item>256 by 256—256 by 256 pixels. This is the default.</bullet_item><para/>
        ///     <bullet_item>512 by 512—512 by 512 pixels.</bullet_item><para/>
        ///     <bullet_item>1024 by 1024—1024 by 1024 pixels.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定缓存切片的宽度和高度（以像素为单位）。为了在性能和可管理性之间取得最佳平衡，请避免偏离 256 x 256 或 512 x 512 的标准宽度。</para>
        ///   <bulletList>
        ///     <bullet_item>128 x 128—128 x 128 像素。</bullet_item><para/>
        ///     <bullet_item>256 x 256 - 256 x 256 像素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>512 x 512—512 x 512 像素。</bullet_item><para/>
        ///     <bullet_item>1024 x 1024—1024 x 1024 像素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CreateMapServerCache(object _input_service, object _service_cache_directory, _tiling_scheme_type_value _tiling_scheme_type, _scales_type_value _scales_type, long? _num_of_scales, long _dots_per_inch, _tile_size_value _tile_size)
        {
            this._input_service = _input_service;
            this._service_cache_directory = _service_cache_directory;
            this._tiling_scheme_type = _tiling_scheme_type;
            this._scales_type = _scales_type;
            this._num_of_scales = _num_of_scales;
            this._dots_per_inch = _dots_per_inch;
            this._tile_size = _tile_size;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Create Map Server Cache";

        public override string CallName => "server.CreateMapServerCache";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_input_service, _service_cache_directory, _tiling_scheme_type.GetGPValue(), _scales_type.GetGPValue(), _num_of_scales, _dots_per_inch, _tile_size.GetGPValue(), _predefined_tiling_scheme, _tile_origin, _scales, _cache_tile_format.GetGPValue(), _tile_compression_quality, _storage_format.GetGPValue(), _out_service_url];

        /// <summary>
        /// <para>Input Service</para>
        /// <para>The map or image layer to be cached. You can drag a map or image layer from the Catalog window to supply this parameter.</para>
        /// <para>要缓存的地图或图像图层。您可以从目录 窗口拖动地图或影像图层以提供此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Service")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_service { get; set; }


        /// <summary>
        /// <para>Service Cache Directory</para>
        /// <para>The parent directory for the cache. This must be a registered ArcGIS Server cache directory.</para>
        /// <para>缓存的父目录。这必须是已注册的 ArcGIS Server 缓存目录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Service Cache Directory")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _service_cache_directory { get; set; }


        /// <summary>
        /// <para>Tiling Scheme</para>
        /// <para><xdoc>
        ///   <para>Specifies how the tiling scheme will be defined. You can define a new tiling scheme with this tool or browse to a predefined tiling scheme file (.xml). A predefined scheme can be created by running the Generate Map Server Cache Tiling Scheme tool.</para>
        ///   <bulletList>
        ///     <bullet_item>New—The tiling scheme will be defined using other parameters in this tool to define scale levels, image format, storage format, and so on. This is the default.</bullet_item><para/>
        ///     <bullet_item>Predefined—The tiling scheme will be defined using an .xml file. You can create a tiling scheme file using the Generate Map Server Cache Tiling Scheme tool.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何定义切片方案。您可以使用此工具定义新的切片方案，也可以浏览至预定义的切片方案文件 （.xml）。可以通过运行生成地图服务器缓存切片方案工具来创建预定义方案。</para>
        ///   <bulletList>
        ///     <bullet_item></bullet_item><para/>
        ///     <bullet_item></bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tiling Scheme")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _tiling_scheme_type_value _tiling_scheme_type { get; set; }

        public enum _tiling_scheme_type_value
        {
            /// <summary>
            /// <para>New</para>
            /// <para>New—The tiling scheme will be defined using other parameters in this tool to define scale levels, image format, storage format, and so on. This is the default.</para>
            /// <para></para>
            /// </summary>
            [Description("New")]
            [GPEnumValue("NEW")]
            _NEW,

            /// <summary>
            /// <para>Predefined</para>
            /// <para>Predefined—The tiling scheme will be defined using an .xml file. You can create a tiling scheme file using the Generate Map Server Cache Tiling Scheme tool.</para>
            /// <para></para>
            /// </summary>
            [Description("Predefined")]
            [GPEnumValue("PREDEFINED")]
            _PREDEFINED,

        }

        /// <summary>
        /// <para>Scales Type</para>
        /// <para><xdoc>
        ///   <para>Specifies how the tiles will be scaled.</para>
        ///   <bulletList>
        ///     <bullet_item>Standard—The scales will be automatically generated based on the number specified in the Number of Scales (num_of_scales in Python) parameter. It will use levels that increase or decrease by half from 1:1,000,000 and will start with a level closest to the extent of the source map document. For example, if the source map document has an extent of 1:121,000,000 and three scale levels are defined, the map service will create a cache with scale levels at 1:128,000,000; 1:64,000,000; and 1:32,000,000. This is the default.</bullet_item><para/>
        ///     <bullet_item>Custom—The cache designer will determine the scales.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定切片的缩放方式。</para>
        ///   <bulletList>
        ///     <bullet_item></bullet_item><para/>
        ///     <bullet_item></bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _scales_type_value _scales_type { get; set; }

        public enum _scales_type_value
        {
            /// <summary>
            /// <para>Standard</para>
            /// <para>Standard—The scales will be automatically generated based on the number specified in the Number of Scales (num_of_scales in Python) parameter. It will use levels that increase or decrease by half from 1:1,000,000 and will start with a level closest to the extent of the source map document. For example, if the source map document has an extent of 1:121,000,000 and three scale levels are defined, the map service will create a cache with scale levels at 1:128,000,000; 1:64,000,000; and 1:32,000,000. This is the default.</para>
            /// <para></para>
            /// </summary>
            [Description("Standard")]
            [GPEnumValue("STANDARD")]
            _STANDARD,

            /// <summary>
            /// <para>Custom</para>
            /// <para>Custom—The cache designer will determine the scales.</para>
            /// <para></para>
            /// </summary>
            [Description("Custom")]
            [GPEnumValue("CUSTOM")]
            _CUSTOM,

        }

        /// <summary>
        /// <para>Number of Scales</para>
        /// <para>The number of scale levels to create in the cache. This option is disabled if you create a custom list of scales.</para>
        /// <para>要在缓存中创建的缩放级别数。如果创建自定义比例列表，则此选项处于禁用状态。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Scales")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _num_of_scales { get; set; }


        /// <summary>
        /// <para>Dots(Pixels) Per Inch</para>
        /// <para>The dots per inch (DPI) of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96.</para>
        /// <para>预期输出设备的每英寸点数 （DPI）。如果选择的 DPI 与输出设备的分辨率不匹配，则地图切片的比例将显示不正确。默认值为 96。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dots(Pixels) Per Inch")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _dots_per_inch { get; set; }


        /// <summary>
        /// <para>Tile Size (in pixels)</para>
        /// <para><xdoc>
        ///   <para>Specifies the width and height of the cache tiles in pixels. For the best balance between performance and manageability, avoid deviating from standard widths of 256 by 256 or 512 by 512.</para>
        ///   <bulletList>
        ///     <bullet_item>128 by 128—128 by 128 pixels.</bullet_item><para/>
        ///     <bullet_item>256 by 256—256 by 256 pixels. This is the default.</bullet_item><para/>
        ///     <bullet_item>512 by 512—512 by 512 pixels.</bullet_item><para/>
        ///     <bullet_item>1024 by 1024—1024 by 1024 pixels.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定缓存切片的宽度和高度（以像素为单位）。为了在性能和可管理性之间取得最佳平衡，请避免偏离 256 x 256 或 512 x 512 的标准宽度。</para>
        ///   <bulletList>
        ///     <bullet_item>128 x 128—128 x 128 像素。</bullet_item><para/>
        ///     <bullet_item>256 x 256 - 256 x 256 像素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>512 x 512—512 x 512 像素。</bullet_item><para/>
        ///     <bullet_item>1024 x 1024—1024 x 1024 像素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tile Size (in pixels)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _tile_size_value _tile_size { get; set; }

        public enum _tile_size_value
        {
            /// <summary>
            /// <para>128 by 128</para>
            /// <para>128 by 128—128 by 128 pixels.</para>
            /// <para>128 x 128—128 x 128 像素。</para>
            /// </summary>
            [Description("128 by 128")]
            [GPEnumValue("128 x 128")]
            _128_x_128,

            /// <summary>
            /// <para>256 by 256</para>
            /// <para>256 by 256—256 by 256 pixels. This is the default.</para>
            /// <para>256 x 256 - 256 x 256 像素。这是默认设置。</para>
            /// </summary>
            [Description("256 by 256")]
            [GPEnumValue("256 x 256")]
            _256_x_256,

            /// <summary>
            /// <para>512 by 512</para>
            /// <para>512 by 512—512 by 512 pixels.</para>
            /// <para>512 x 512—512 x 512 像素。</para>
            /// </summary>
            [Description("512 by 512")]
            [GPEnumValue("512 x 512")]
            _512_x_512,

            /// <summary>
            /// <para>1024 by 1024</para>
            /// <para>1024 by 1024—1024 by 1024 pixels.</para>
            /// <para>1024 x 1024—1024 x 1024 像素。</para>
            /// </summary>
            [Description("1024 by 1024")]
            [GPEnumValue("1024 x 1024")]
            _1024_x_1024,

        }

        /// <summary>
        /// <para>Predefined Tiling Scheme</para>
        /// <para>The path to a predefined tiling scheme file (usually named conf.xml).</para>
        /// <para>预定义切片方案文件（通常命名为 conf.xml）的路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Predefined Tiling Scheme")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _predefined_tiling_scheme { get; set; } = null;


        /// <summary>
        /// <para>Tiling origin in map units</para>
        /// <para>The origin (upper left corner) of the tiling scheme in the coordinates of the spatial reference of the source map document. The extent of the source map document must be within (but does not need to coincide with) this region.</para>
        /// <para>切片方案的原点（左上角）在源地图文档的空间参考坐标中。源地图文档的范围必须位于此区域内（但不需要与此区域重合）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tiling origin in map units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tile_origin { get; set; } = null;


        /// <summary>
        /// <para>Scales</para>
        /// <para>The scale levels available for the cache. These are not represented as fractions. Instead, use 500 to represent a scale of 1:500, for example.</para>
        /// <para>可用于缓存的缩放级别。这些不表示为分数。例如，请使用 500 表示 1：500 的比例。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _scales { get; set; } = null;


        /// <summary>
        /// <para>Cache Tile Format</para>
        /// <para><xdoc>
        ///   <para>Specifies the cache tile format.</para>
        ///   <bulletList>
        ///     <bullet_item>PNG—A PNG format with varying bit depths. The bit depths are optimized according to the color variation and transparency values in a tile. This is the default.</bullet_item><para/>
        ///     <bullet_item>PNG8—A lossless, 8-bit color, image format that uses an indexed color palette and an alpha table. Each pixel stores a value (0–255) that is used to look up the color in the color palette and the transparency in the alpha table. 8-bit PNG images are similar to GIF images, and most web browsers support transparent backgrounds in PNG images.</bullet_item><para/>
        ///     <bullet_item>PNG24—A lossless, three-channel image format that supports large color variations (16 million colors) and has limited support for transparency. Each pixel contains three 8-bit color channels, and the file header contains the single color that represents the transparent background. Versions of Internet Explorer earlier than version 7 do not support this type of transparency. Caches using PNG24 are significantly larger than those using PNG8 or JPEG and will use more disk space and require greater bandwidth to serve clients.</bullet_item><para/>
        ///     <bullet_item>PNG32—A lossless, four-channel image format that supports large color variations (16 million colors) and transparency. Each pixel contains three 8-bit color channels and one 8-bit alpha channel that represents the level of transparency for each pixel. While the PNG32 format allows for partially transparent pixels in the range from 0 to 255, the ArcGIS Server cache generation tool only writes fully transparent (0) or fully opaque (255) values in the transparency channel. Caches using PNG32 are significantly larger than the other supported formats and will use more disk space and require greater bandwidth to serve clients.</bullet_item><para/>
        ///     <bullet_item>JPEG—A lossy, three-channel image format that supports large color variations (16 million colors) but does not support transparency. Each pixel contains three 8-bit color channels. Caches using JPEG provide control over output quality and size.</bullet_item><para/>
        ///     <bullet_item>Mixed—The PNG32 format will be created anywhere that transparency is detected (that is, anywhere that the data frame background is visible). The JPEG format will be created for the remaining tiles. This keeps the average file size down while providing a clean overlay on top of other caches.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定缓存切片格式。</para>
        ///   <bulletList>
        ///     <bullet_item>PNG - 具有不同位深度的 PNG 格式。位深度根据图块中的颜色变化和透明度值进行优化。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>PNG8 - 一种无损的 8 位彩色图像格式，使用索引调色板和 alpha 表。每个像素存储一个值 （0–255），该值用于查找调色板中的颜色和 alpha 表中的透明度。8 位 PNG 图像类似于 GIF 图像，大多数 Web 浏览器都支持 PNG 图像中的透明背景。</bullet_item><para/>
        ///     <bullet_item>PNG24 - 一种无损的三通道图像格式，支持较大的颜色变化（1600 万种颜色），但对透明度的支持有限。每个像素包含三个 8 位颜色通道，文件头包含表示透明背景的单一颜色。版本 7 之前的 Internet Explorer 版本不支持这种类型的透明度。使用 PNG24 的缓存比使用 PNG8 或 JPEG 的缓存大得多，并且会使用更多的磁盘空间，并且需要更大的带宽来为客户端提供服务。</bullet_item><para/>
        ///     <bullet_item>PNG32 - 一种无损的四通道图像格式，支持较大的颜色变化（1600 万种颜色）和透明度。每个像素包含三个 8 位颜色通道和一个 8 位 Alpha 通道，表示每个像素的透明度级别。虽然 PNG32 格式允许在 0 到 255 范围内使用部分透明像素，但 ArcGIS Server 缓存生成工具仅在透明度通道中写入完全透明 （0） 或完全不透明 （255） 值。使用 PNG32 的缓存明显大于其他受支持的格式，并且将使用更多的磁盘空间，并且需要更大的带宽来为客户端提供服务。</bullet_item><para/>
        ///     <bullet_item>JPEG - 一种有损的三通道图像格式，支持较大的颜色变化（1600 万种颜色），但不支持透明度。每个像素包含三个 8 位颜色通道。使用 JPEG 的缓存提供对输出质量和大小的控制。</bullet_item><para/>
        ///     <bullet_item>混合 - 将在检测到透明度的任何位置（即数据框背景可见的任何位置）创建 PNG32 格式。将为其余切片创建 JPEG 格式。这样可以降低平均文件大小，同时在其他缓存之上提供干净的覆盖层。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cache Tile Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _cache_tile_format_value _cache_tile_format { get; set; } = _cache_tile_format_value._PNG;

        public enum _cache_tile_format_value
        {
            /// <summary>
            /// <para>PNG</para>
            /// <para>PNG—A PNG format with varying bit depths. The bit depths are optimized according to the color variation and transparency values in a tile. This is the default.</para>
            /// <para>PNG - 具有不同位深度的 PNG 格式。位深度根据图块中的颜色变化和透明度值进行优化。这是默认设置。</para>
            /// </summary>
            [Description("PNG")]
            [GPEnumValue("PNG")]
            _PNG,

            /// <summary>
            /// <para>PNG8</para>
            /// <para>PNG8—A lossless, 8-bit color, image format that uses an indexed color palette and an alpha table. Each pixel stores a value (0–255) that is used to look up the color in the color palette and the transparency in the alpha table. 8-bit PNG images are similar to GIF images, and most web browsers support transparent backgrounds in PNG images.</para>
            /// <para>PNG8 - 一种无损的 8 位彩色图像格式，使用索引调色板和 alpha 表。每个像素存储一个值 （0–255），该值用于查找调色板中的颜色和 alpha 表中的透明度。8 位 PNG 图像类似于 GIF 图像，大多数 Web 浏览器都支持 PNG 图像中的透明背景。</para>
            /// </summary>
            [Description("PNG8")]
            [GPEnumValue("PNG8")]
            _PNG8,

            /// <summary>
            /// <para>PNG24</para>
            /// <para>PNG24—A lossless, three-channel image format that supports large color variations (16 million colors) and has limited support for transparency. Each pixel contains three 8-bit color channels, and the file header contains the single color that represents the transparent background. Versions of Internet Explorer earlier than version 7 do not support this type of transparency. Caches using PNG24 are significantly larger than those using PNG8 or JPEG and will use more disk space and require greater bandwidth to serve clients.</para>
            /// <para>PNG24 - 一种无损的三通道图像格式，支持较大的颜色变化（1600 万种颜色），但对透明度的支持有限。每个像素包含三个 8 位颜色通道，文件头包含表示透明背景的单一颜色。版本 7 之前的 Internet Explorer 版本不支持这种类型的透明度。使用 PNG24 的缓存比使用 PNG8 或 JPEG 的缓存大得多，并且会使用更多的磁盘空间，并且需要更大的带宽来为客户端提供服务。</para>
            /// </summary>
            [Description("PNG24")]
            [GPEnumValue("PNG24")]
            _PNG24,

            /// <summary>
            /// <para>PNG32</para>
            /// <para>PNG32—A lossless, four-channel image format that supports large color variations (16 million colors) and transparency. Each pixel contains three 8-bit color channels and one 8-bit alpha channel that represents the level of transparency for each pixel. While the PNG32 format allows for partially transparent pixels in the range from 0 to 255, the ArcGIS Server cache generation tool only writes fully transparent (0) or fully opaque (255) values in the transparency channel. Caches using PNG32 are significantly larger than the other supported formats and will use more disk space and require greater bandwidth to serve clients.</para>
            /// <para>PNG32 - 一种无损的四通道图像格式，支持较大的颜色变化（1600 万种颜色）和透明度。每个像素包含三个 8 位颜色通道和一个 8 位 Alpha 通道，表示每个像素的透明度级别。虽然 PNG32 格式允许在 0 到 255 范围内使用部分透明像素，但 ArcGIS Server 缓存生成工具仅在透明度通道中写入完全透明 （0） 或完全不透明 （255） 值。使用 PNG32 的缓存明显大于其他受支持的格式，并且将使用更多的磁盘空间，并且需要更大的带宽来为客户端提供服务。</para>
            /// </summary>
            [Description("PNG32")]
            [GPEnumValue("PNG32")]
            _PNG32,

            /// <summary>
            /// <para>JPEG</para>
            /// <para>JPEG—A lossy, three-channel image format that supports large color variations (16 million colors) but does not support transparency. Each pixel contains three 8-bit color channels. Caches using JPEG provide control over output quality and size.</para>
            /// <para>JPEG - 一种有损的三通道图像格式，支持较大的颜色变化（1600 万种颜色），但不支持透明度。每个像素包含三个 8 位颜色通道。使用 JPEG 的缓存提供对输出质量和大小的控制。</para>
            /// </summary>
            [Description("JPEG")]
            [GPEnumValue("JPEG")]
            _JPEG,

            /// <summary>
            /// <para>Mixed</para>
            /// <para>Mixed—The PNG32 format will be created anywhere that transparency is detected (that is, anywhere that the data frame background is visible). The JPEG format will be created for the remaining tiles. This keeps the average file size down while providing a clean overlay on top of other caches.</para>
            /// <para>混合 - 将在检测到透明度的任何位置（即数据框背景可见的任何位置）创建 PNG32 格式。将为其余切片创建 JPEG 格式。这样可以降低平均文件大小，同时在其他缓存之上提供干净的覆盖层。</para>
            /// </summary>
            [Description("Mixed")]
            [GPEnumValue("MIXED")]
            _MIXED,

        }

        /// <summary>
        /// <para>Tile Compression Quality</para>
        /// <para><xdoc>
        ///   <para>The JPEG compression quality (1–100). The default value is 75 for the JPEG tile format and 0 for other formats.</para>
        ///   <para>Compression is supported only for the JPEG format. Choosing a higher value will result in a larger file size with a higher-quality image. Choosing a lower value will result in a smaller file size with a lower-quality image.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>JPEG 压缩质量 （1–100）。JPEG 切片格式的默认值为 75，其他格式的默认值为 0。</para>
        ///   <para>只有 JPEG 格式支持压缩。选择更高的值将导致更大的文件大小和更高质量的图像。选择较低的值将导致文件大小变小，图像质量较低。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tile Compression Quality")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _tile_compression_quality { get; set; } = 0;


        /// <summary>
        /// <para>Storage Format</para>
        /// <para><xdoc>
        ///   <para>Specifies the storage format of tiles.</para>
        ///   <bulletList>
        ///     <bullet_item>Compact—Tiles will be grouped into large files called bundles. This storage format is efficient in terms of storage and mobility. This is the default.</bullet_item><para/>
        ///     <bullet_item>Exploded—Each tile will be stored as a separate file.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定切片的存储格式。</para>
        ///   <bulletList>
        ///     <bullet_item>紧凑—切片将被分组为称为包的大文件。这种存储格式在存储和移动性方面非常高效。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>分解 - 每个切片将存储为单独的文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Storage Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _storage_format_value _storage_format { get; set; } = _storage_format_value._COMPACT;

        public enum _storage_format_value
        {
            /// <summary>
            /// <para>Compact</para>
            /// <para>Compact—Tiles will be grouped into large files called bundles. This storage format is efficient in terms of storage and mobility. This is the default.</para>
            /// <para>紧凑—切片将被分组为称为包的大文件。这种存储格式在存储和移动性方面非常高效。这是默认设置。</para>
            /// </summary>
            [Description("Compact")]
            [GPEnumValue("COMPACT")]
            _COMPACT,

        }

        /// <summary>
        /// <para>Output Map Service URL</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Map Service URL")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_service_url { get; set; }


        public CreateMapServerCache SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}